﻿//-----------------------------------------------------------------------
// <copyright file="Copyright.cs" author="Michael Herndon">
//     Copyright (c) Michael Herndon.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Amplify.Twitter
{
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.ServiceModel;
	using System.ServiceModel.Web;
	using System.Text;

	/// <summary>
	/// Contract for twitter Block methods. 
	/// </summary>
	[ServiceContract]
	public interface IBlockClient
	{
		/// <summary>
		/// Creates a block against a user.
		/// </summary>
		/// <param name="id">The screen name or id of the user.</param>
		/// <returns>returns a <see cref="Amplify.Twitter.User"/> object if the destroy was successful, otherwise false.</returns>
		/// <exception cref="System.ServiceModel.Security.MessageSecurityException" />
		/// <exception cref="Amplify.Twitter.TwitterException"> Throws when a twitter error occurs. </exception>
		[OperationContract,
			WebInvoke(
				BodyStyle = WebMessageBodyStyle.Bare,
				ResponseFormat = WebMessageFormat.Json,
				UriTemplate = "/blocks/create/{id}.json")]
		User Create(string id);

		/// <summary>
		/// Destroys the block against a user.
		/// </summary>
		/// <param name="id">The screen name or id of the user.</param>
		/// <returns> returns a <see cref="Amplify.Twitter.User"/> object if the destroy was successful, otherwise false. </returns>
		/// <exception cref="System.ServiceModel.Security.MessageSecurityException" />
		/// <exception cref="Amplify.Twitter.TwitterException"> Throws when a twitter error occurs. </exception>
		[OperationContract,
			WebInvoke(
				BodyStyle = WebMessageBodyStyle.Bare,
				ResponseFormat = WebMessageFormat.Json,
				UriTemplate = "/blocks/destroy/{id}.json")]
		User Destroy(string id);
	}
}
